﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OpenAuth.Domain.Interface
{
    /// <summary>
    /// ③仓储层定义仓储接口，下面是仓储层实现仓储接口
    /// </summary>
    public interface ISortDetailRepository:IRepository<SortDetail>
    {
        /// <summary>
        /// 分页获取类别明细
        /// </summary>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        IEnumerable<SortDetail> LoadSortDetails(int pageindex, int pagesize);

        /// <summary>
        /// 获取类别下的类别明细
        /// </summary>
        /// <param name="sortId"></param>
        /// <returns></returns>
        IEnumerable<SortDetail> LoadInSorts(params Guid[] sortId);
        /// <summary>
        /// 获取类别下类别明细数据条数
        /// </summary>
        /// <param name="sortIds"></param>
        /// <returns></returns>
        int GetSortDetailCntInSorts(params Guid[] sortIds);
        /// <summary>
        /// 分页获取类别下的类别明细
        /// </summary>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <param name="orgIds"></param>
        /// <returns></returns>
        IEnumerable<SortDetail> LoadInSorts(int pageindex, int pagesize, params Guid[] orgIds);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        void Delete(Guid id);
    }
}
